<h3><%= Federails::Moderation::Report.model_name.human %> #<%= @report.id %></h3>

<ul>
  <li>
    <%= Federails::Moderation::Report.human_attribute_name(:created_at) %>:
    <%= @report.created_at %>
  </li>
  <li>
    <%= Federails::Moderation::Report.human_attribute_name(:federails_actor) %>:
    <%= @report.reporter_address %>
  </li>
</ul>

<% if @report.content.present? %>
  <h4><%= Federails::Moderation::Report.human_attribute_name(:content) %>:</h4>
  <div class="alert alert-warning">
    <%= @report.content %>
  </div>
<% end %>

<h4><%= Federails::Moderation::Report.human_attribute_name(:object) %></h4>
<table class="table table-striped">
  <% Array(@report.object).each do |object| %>
    <tr>
      <% if @report.object&.entity %>
        <td>
          <%= @report.object.entity.model_name.human %>
        </td>
        <td>
          <%= link_to @report.object.entity.name, @report.object.entity %>
        </td>
      <% end %>
    </tr>
  <% end %>
</table>

<div class="mt-3">
  <%= link_to t(".resolve"), settings_report_path(@report, resolve: true), method: :patch, class: "btn btn-primary" %>
  <%= link_to t(".ignore"), settings_report_path(@report, ignore: true), method: :patch, class: "btn btn-danger" %>
</div>
